import {
    request
} from "./index";

// 购物车模块
const apiModule = 'goodsCartApp/';

// 删除
export const deleteCart = (data) => {
    return request(apiModule + 'delete', data);
}

// 批量删除
export const deleteBatchCart = (data) => {
    return request(apiModule + 'deleteBatchIds', data);
}

// 查看详情
export const queryCartDetail = (data) => {
    return request(apiModule + 'queryDetails', data);
}

// 列表查询
export const queryCartList = (data) => {
    return request(apiModule + 'queryList', data);
}

// 新增/取消
export const updateCart = (data) => {
    return request(apiModule + 'save', data);
}

// 计算购物车价格
export const queryPriceTotal = (data) => {
    return request(apiModule + 'getPriceTotal', data);
}

// 查看购物车数量
export const queryCartCount = (data) => {
    return request(apiModule + 'getCartGoodsNum', data);
}